package com.product.magina.webserviceclient.service;

import com.magina.common.model.UserInfo;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import java.util.List;

/**
 * webservice测试接口
 * 
 * @author：anti_magina
 * @date：2019-03-29 10:15:53
 */
@WebService(name = "TestService", // 暴露服务名称
targetNamespace = "http://service.webserviceclient.magina.product.com"// 命名空间,一般是接口的包名倒序
)
public interface TestService {

    //测试方法重载
    @WebMethod(operationName="sendMessageByUsername")
    @WebResult(name = "sendMessageResult",partName = "",targetNamespace = "")
    String sendMessage(@WebParam(name = "username") String username);
    //测试方法重载
    @WebMethod(operationName = "sendMessageById")
    @WebResult(name = "String", targetNamespace = "")
    String sendMessage(@WebParam(name = "alisename") String username,@WebParam(name = "aliseid")String id);
    //测试方法传Json转换成Moel
    @WebMethod
    @WebResult(name = "String", targetNamespace = "")
    String saveMessage(@WebParam(name = "model") String model);
    //测试基本参数
    @WebMethod
    String getUserName(@WebParam(name="username")String username);
    //测试方法传递JavaBean
    @WebMethod
    UserInfo getUser(@WebParam(name="user")UserInfo user);
    //测试方法传递List<JavaBean>
    @WebMethod
    List<UserInfo> getUserList(@WebParam(name="userList")List<UserInfo> userList);
    //测试方法传递多个复杂参数
    @WebMethod
    List<UserInfo> getUserListByName(@WebParam(name="userList")List<UserInfo> userList,@WebParam(name = "userName")String userName);
}